# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=poco
pkgver=1.10.1
pkgrel=1
pkgdesc="C++ class libraries for building network- and internet-based applications"
url="https://pocoproject.org/"
arch="all !mips !mips64" # fails to build on soft-float
license="BSL-1.0"
makedepends="cmake chrpath openssl-dev linux-headers zlib-dev pcre-dev expat-dev sqlite-dev mariadb-connector-c-dev unixodbc-dev postgresql-dev"
source="https://pocoproject.org/releases/poco-$pkgver/poco-$pkgver-all.tar.gz
	cxxflags.patch
	"
subpackages="$pkgname-dev"
options="!check" # No testsuite

builddir="$srcdir/$pkgname-$pkgver-all"

build() {
	cmake -B "$builddir"/build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	make -C build
}

package() {
	DESTDIR="$pkgdir" make -C build install
}

sha512sums="858a37c49563fa602a5e4783438154a3e1e6c91f8a3adcae62c3d922eccd30b8ba273b2c2b16b5f80c1deb80eb350056e6923a2788ec2e17a595a44d4f97f30d  poco-1.10.1-all.tar.gz
5f72e487074ea26e29e81d6fc244d03989d780d71b33a064456fa19b241aca278fbfd9b303733940b837921ea25781ee62905d70a5f1c57f1b24cd38a2a7d720  cxxflags.patch"
